public class Ex8_8{
	public static void main(String[] args){
		Fan fan1 = new Fan();
		fan1.setSpeed(Fan.FAST);
		fan1.setRadius(10);
		fan1.setColor("yellow");
		fan1.setOn(true);
		System.out.println(fan1.toString());

		Fan fan2 = new Fan();
		fan2.setSpeed(Fan.MEDIUM);
		fan2.setRadius(5);
		fan2.setColor("blue");
		fan2.setOn(false);
		System.out.println(fan2.toString());

	}
}

class Fan{
	final static int SLOW = 1;
	final static int MEDIUM = 2;
	final static int FAST = 3;
	private int speed;
	private boolean on = false;
	private double radius = 5;
	String color = "blue";

	public int getSpeed(){
		return speed;
	}

	public void setSpeed(int s){
		speed = s;
	}

	public boolean getOn(){
		return on;
	}

	public void setOn(boolean o){
		on = o;
	}

	public double getRadius(){
		return radius;
	}

	public void setRadius(double r){
		radius = r;
	}

	public String getColor(){
		return color;
	}

	public void setColor(String c){
		color = c;
	}

	public Fan(){
	}

	public String toString(){
		if (on)
			return "Speed: " + speed + " Color: " + color + " Radius: " + radius;
		else
			return "Color: " + color + " Radius: " + radius + " fan is off";
	}
}